import { ApiProperty } from '@nestjs/swagger'
import {
  IsNotEmpty,
  IsNumber,
  IsOptional,
  IsString,
  MaxLength
} from 'class-validator'
export class CreateChangeSalaryDto {
  @ApiProperty({ description: '员工ID', example: 1 })
  @IsNumber({}, { message: '员工ID必须为数字' })
  @IsNotEmpty({ message: '员工ID不能为空' })
  staffId: number
  @ApiProperty({ description: '调薪前薪资', example: 1000 })
  @IsNumber({}, { message: '调薪前薪资必须为数字' })
  @IsNotEmpty({ message: '调薪前薪资不能为空' })
  beforeSalary: number
  @ApiProperty({ description: '调薪后薪资', example: 2000 })
  @IsNumber({}, { message: '调薪后薪资必须为数字' })
  @IsNotEmpty({ message: '调薪后薪资不能为空' })
  afterSalary: number
  @ApiProperty({ description: '调薪原因', example: '调薪原因' })
  @IsString({ message: '调薪原因必须为字符串' })
  @IsNotEmpty({ message: '调薪原因不能为空' })
  @MaxLength(100, { message: '调薪原因最长为100个字符' })
  reason: string
  @ApiProperty({ description: '备注', example: '备注' })
  @IsOptional()
  @IsString({ message: '备注必须为字符串' })
  @MaxLength(200, { message: '备注最长为200个字符' })
  remark?: string
}
